home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / PInterfaces / AppleTalk.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  30.2 KB  |  826 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        AppleTalk.p
  3.  
  4.      Contains:    AppleTalk Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT AppleTalk;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __APPLETALK__}
  27. {$SETC __APPLETALK__ := 1}
  28.  
  29. {$I+}
  30. {$SETC AppleTalkIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __OSUTILS__}
  37. {$I OSUtils.p}
  38. {$ENDC}
  39.  
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45.  
  46. CONST
  47.                                                                 {  Driver unit numbers (ADSP is dynamic)  }
  48.     mppUnitNum                    = 9;                            {  MPP unit number  }
  49.     atpUnitNum                    = 10;                            {  ATP unit number  }
  50.     xppUnitNum                    = 40;                            {  XPP unit number  }
  51.  
  52.                                                                 {  Driver refNums (ADSP is dynamic)  }
  53.     mppRefNum                    = -10;                            {  MPP reference number  }
  54.     atpRefNum                    = -11;                            {  ATP reference number  }
  55.     xppRefNum                    = -41;                            {  XPP reference number  }
  56.  
  57.                                                                 {  .MPP csCodes  }
  58.     lookupReply                    = 242;                            {  This command queued to ourself  }
  59.     writeLAP                    = 243;                            {  Write out LAP packet  }
  60.     detachPH                    = 244;                            {  Detach LAP protocol handler  }
  61.     attachPH                    = 245;                            {  Attach LAP protocol handler  }
  62.     writeDDP                    = 246;                            {  Write out DDP packet  }
  63.     closeSkt                    = 247;                            {  Close DDP socket  }
  64.     openSkt                        = 248;                            {  Open DDP socket  }
  65.     loadNBP                        = 249;                            {  Load NBP command-executing code  }
  66.     lastResident                = 249;                            {  Last resident command  }
  67.     confirmName                    = 250;                            {  Confirm name  }
  68.     lookupName                    = 251;                            {  Look up name on internet  }
  69.     removeName                    = 252;                            {  Remove name from Names Table  }
  70.     registerName                = 253;                            {  Register name in Names Table  }
  71.     killNBP                        = 254;                            {  Kill outstanding NBP request  }
  72.     unloadNBP                    = 255;                            {  Unload NBP command code  }
  73.     setSelfSend                    = 256;                            {  MPP: Set to allow writes to self  }
  74.     SetMyZone                    = 257;                            {  Set my zone name  }
  75.     GetATalkInfo                = 258;                            {  get AppleTalk information  }
  76.     ATalkClosePrep                = 259;                            {  AppleTalk close query  }
  77.  
  78.                                                                 {  .ATP csCodes  }
  79.     nSendRequest                = 248;                            {  NSendRequest code  }
  80.     relRspCB                    = 249;                            {  Release RspCB  }
  81.     closeATPSkt                    = 250;                            {  Close ATP socket  }
  82.     addResponse                    = 251;                            {  Add response code | Require open skt  }
  83.     sendResponse                = 252;                            {  Send response code  }
  84.     getRequest                    = 253;                            {  Get request code  }
  85.     openATPSkt                    = 254;                            {  Open ATP socket  }
  86.     sendRequest                    = 255;                            {  Send request code  }
  87.     relTCB                        = 256;                            {  Release TCB  }
  88.     killGetReq                    = 257;                            {  Kill GetRequest  }
  89.     killSendReq                    = 258;                            {  Kill SendRequest  }
  90.     killAllGetReq                = 259;                            {  Kill all getRequests for a skt  }
  91.  
  92.                                                                 {  .XPP csCodes  }
  93.     openSess                    = 255;                            {  Open session  }
  94.     closeSess                    = 254;                            {  Close session  }
  95.     userCommand                    = 253;                            {  User command  }
  96.     userWrite                    = 252;                            {  User write  }
  97.     getStatus                    = 251;                            {  Get status  }
  98.     afpCall                        = 250;                            {  AFP command (buffer has command code)  }
  99.     getParms                    = 249;                            {  Get parameters  }
  100.     abortOS                        = 248;                            {  Abort open session request  }
  101.     closeAll                    = 247;                            {  Close all open sessions  }
  102.     xCall                        = 246;                            {  .XPP extended calls  }
  103.  
  104.                                                                 {  Transition Queue transition types  }
  105.     ATTransOpen                    = 0;                            { AppleTalk has opened }
  106.     ATTransClose                = 2;                            { AppleTalk is about to close }
  107.     ATTransClosePrep            = 3;                            { Is it OK to close AppleTalk ? }
  108.     ATTransCancelClose            = 4;                            { Cancel the ClosePrep transition }
  109.  
  110.     afpByteRangeLock            = 1;                            { AFPCall command codes }
  111.     afpVolClose                    = 2;                            { AFPCall command codes }
  112.     afpDirClose                    = 3;                            { AFPCall command codes }
  113.     afpForkClose                = 4;                            { AFPCall command codes }
  114.     afpCopyFile                    = 5;                            { AFPCall command codes }
  115.     afpDirCreate                = 6;                            { AFPCall command codes }
  116.     afpFileCreate                = 7;                            { AFPCall command codes }
  117.     afpDelete                    = 8;                            { AFPCall command codes }
  118.     afpEnumerate                = 9;                            { AFPCall command codes }
  119.     afpFlush                    = 10;                            { AFPCall command codes }
  120.     afpForkFlush                = 11;                            { AFPCall command codes }
  121.     afpGetDirParms                = 12;                            { AFPCall command codes }
  122.     afpGetFileParms                = 13;                            { AFPCall command codes }
  123.     afpGetForkParms                = 14;                            { AFPCall command codes }
  124.     afpGetSInfo                    = 15;                            { AFPCall command codes }
  125.     afpGetSParms                = 16;                            { AFPCall command codes }
  126.     afpGetVolParms                = 17;                            { AFPCall command codes }
  127.     afpLogin                    = 18;                            { AFPCall command codes }
  128.     afpContLogin                = 19;                            { AFPCall command codes }
  129.     afpLogout                    = 20;                            { AFPCall command codes }
  130.     afpMapID                    = 21;                            { AFPCall command codes }
  131.     afpMapName                    = 22;                            { AFPCall command codes }
  132.     afpMove                        = 23;                            { AFPCall command codes }
  133.     afpOpenVol                    = 24;                            { AFPCall command codes }
  134.     afpOpenDir                    = 25;                            { AFPCall command codes }
  135.     afpOpenFork                    = 26;                            { AFPCall command codes }
  136.     afpRead                        = 27;                            { AFPCall command codes }
  137.     afpRename                    = 28;                            { AFPCall command codes }
  138.     afpSetDirParms                = 29;                            { AFPCall command codes }
  139.     afpSetFileParms                = 30;                            { AFPCall command codes }
  140.     afpSetForkParms                = 31;                            { AFPCall command codes }
  141.     afpSetVolParms                = 32;                            { AFPCall command codes }
  142.     afpWrite                    = 33;                            { AFPCall command codes }
  143.     afpGetFlDrParms                = 34;                            { AFPCall command codes }
  144.     afpSetFlDrParms                = 35;                            { AFPCall command codes }
  145.     afpDTOpen                    = 48;                            { AFPCall command codes }
  146.     afpDTClose                    = 49;                            { AFPCall command codes }
  147.     afpGetIcon                    = 51;                            { AFPCall command codes }
  148.     afpGtIcnInfo                = 52;                            { AFPCall command codes }
  149.     afpAddAPPL                    = 53;                            { AFPCall command codes }
  150.     afpRmvAPPL                    = 54;                            { AFPCall command codes }
  151.     afpGetAPPL                    = 55;                            { AFPCall command codes }
  152.     afpAddCmt                    = 56;                            { AFPCall command codes }
  153.     afpRmvCmt                    = 57;                            { AFPCall command codes }
  154.     afpGetCmt                    = 58;                            { AFPCall command codes }
  155.     afpAddIcon                    = 192;                            { Special code for ASP Write commands }
  156.  
  157.     xppLoadedBit                = 5;                            {  XPP bit in PortBUse  }
  158.     scbMemSize                    = 192;                            {  Size of memory for SCB  }
  159.     xppFlagClr                    = 0;                            {  Cs for AFPCommandBlock  }
  160.  
  161.     xppFlagSet                    = 128;                            {  StartEndFlag & NewLineFlag fields.  }
  162.  
  163.     lapSize                        = 20;
  164.     ddpSize                        = 26;
  165.     nbpSize                        = 26;
  166.     atpSize                        = 56;
  167.  
  168.     atpXOvalue                    = 32;                            { ATP exactly-once bit  }
  169.     atpEOMvalue                    = 16;                            { ATP End-Of-Message bit  }
  170.     atpSTSvalue                    = 8;                            { ATP Send-Transmission-Status bit  }
  171.     atpTIDValidvalue            = 2;                            { ATP trans. ID valid bit  }
  172.     atpSendChkvalue                = 1;                            { ATP send checksum bit  }
  173.  
  174.     zipGetLocalZones            = 5;
  175.     zipGetZoneList                = 6;
  176.     zipGetMyZone                = 7;
  177.  
  178.     LAPMgrPtr                    = $0B18;                        { Entry point for LAP Manager }
  179.  
  180.     LAPMgrCall                    = 2;                            { Offset to LAP routines }
  181.     LAddAEQ                        = 23;                            { LAPAddATQ routine selector }
  182.     LRmvAEQ                        = 24;                            { LAPRmvATQ routine selector }
  183.  
  184.     tLAPRead                    = 0;
  185.     tLAPWrite                    = 1;
  186.     tDDPRead                    = 2;
  187.     tDDPWrite                    = 3;
  188.     tNBPLookup                    = 4;
  189.     tNBPConfirm                    = 5;
  190.     tNBPRegister                = 6;
  191.     tATPSndRequest                = 7;
  192.     tATPGetRequest                = 8;
  193.     tATPSdRsp                    = 9;
  194.     tATPAddRsp                    = 10;
  195.     tATPRequest                    = 11;
  196.     tATPResponse                = 12;
  197.  
  198.  
  199. TYPE
  200.     ABCallType                            = SInt8;
  201.  
  202. CONST
  203.     lapProto                    = 0;
  204.     ddpProto                    = 1;
  205.     nbpProto                    = 2;
  206.     atpProto                    = 3;
  207.  
  208.  
  209. TYPE
  210.     ABProtoType                            = UInt8;
  211.     ABByte                                = Byte;
  212.     LAPAdrBlockPtr = ^LAPAdrBlock;
  213.     LAPAdrBlock = PACKED RECORD
  214.         dstNodeID:                UInt8;
  215.         srcNodeID:                UInt8;
  216.         lapProtType:            ABByte;
  217.         filler:                    UInt8;                                    {     Filler for proper byte alignment }
  218.     END;
  219.  
  220.     ATQEntryPtr = ^ATQEntry;
  221. {$IFC TYPED_FUNCTION_POINTERS}
  222.     ATalkTransitionEventProcPtr = FUNCTION(eventCode: LONGINT; qElem: ATQEntryPtr; eventParameter: UNIV Ptr): LONGINT; C;
  223. {$ELSEC}
  224.     ATalkTransitionEventProcPtr = ProcPtr;
  225. {$ENDC}
  226.  
  227.     ATalkTransitionEventUPP = UniversalProcPtr;
  228.     ATalkTransitionEvent                = ATalkTransitionEventUPP;
  229.     ATQEntry = RECORD
  230.         qLink:                    ATQEntryPtr;                            { next queue entry }
  231.         qType:                    INTEGER;                                { queue type }
  232.         CallAddr:                ATalkTransitionEventUPP;                { your routine descriptor }
  233.     END;
  234.  
  235.     Real definition of EntityName is 3 PACKED strings of any length (32 is just an example). No
  236.     offests for Asm since each String address must be calculated by adding length byte to last string ptr.
  237.     In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte unless they are 
  238.     only a byte long. So this will generate correct looking interfaces for Pascal and C, but they will not
  239.     be the same, which is OK since they are not used. 
  240. }
  241.     EntityNamePtr = ^EntityName;
  242.     EntityName = RECORD
  243.         objStr:                    Str32Field;
  244.         typeStr:                Str32Field;
  245.         zoneStr:                Str32Field;
  246.     END;
  247.  
  248.     EntityPtr                            = ^EntityName;
  249.     AddrBlockPtr = ^AddrBlock;
  250.     AddrBlock = PACKED RECORD
  251.         aNet:                    UInt16;
  252.         aNode:                    UInt8;
  253.         aSocket:                UInt8;
  254.     END;
  255.  
  256.     RetransTypePtr = ^RetransType;
  257.     RetransType = PACKED RECORD
  258.         retransInterval:        UInt8;
  259.         retransCount:            UInt8;
  260.     END;
  261.  
  262.     BDSElementPtr = ^BDSElement;
  263.     BDSElement = RECORD
  264.         buffSize:                INTEGER;
  265.         buffPtr:                Ptr;
  266.         dataSize:                INTEGER;
  267.         userBytes:                LONGINT;
  268.     END;
  269.  
  270.     BDSType                                = ARRAY [0..7] OF BDSElement;
  271.     BDSPtr                                = ^BDSElement;
  272.     BitMapType = PACKED ARRAY [0..7] OF BOOLEAN;
  273.     ATLAPRecPtr = ^ATLAPRec;
  274.     ATLAPRec = RECORD
  275.         abOpcode:                ABCallType;
  276.         filler:                    SInt8;                                    {     Filler for proper byte alignment }
  277.         abResult:                INTEGER;
  278.         abUserReference:        LONGINT;
  279.         lapAddress:                LAPAdrBlock;
  280.         lapReqCount:            INTEGER;
  281.         lapActCount:            INTEGER;
  282.         lapDataPtr:                Ptr;
  283.     END;
  284.  
  285.     ATLAPRecHandle                        = ^ATLAPRecPtr;
  286.     ATDDPRecPtr = ^ATDDPRec;
  287.     ATDDPRec = RECORD
  288.         abOpcode:                ABCallType;
  289.         filler:                    SInt8;                                    {     Filler for proper byte alignment }
  290.         abResult:                INTEGER;
  291.         abUserReference:        LONGINT;
  292.         ddpType:                INTEGER;
  293.         ddpSocket:                INTEGER;
  294.         ddpAddress:                AddrBlock;
  295.         ddpReqCount:            INTEGER;
  296.         ddpActCount:            INTEGER;
  297.         ddpDataPtr:                Ptr;
  298.         ddpNodeID:                INTEGER;
  299.     END;
  300.  
  301.     ATDDPRecHandle                        = ^ATDDPRecPtr;
  302.     ATNBPRecPtr = ^ATNBPRec;
  303.     ATNBPRec = RECORD
  304.         abOpcode:                ABCallType;
  305.         filler:                    SInt8;                                    {     Filler for proper byte alignment }
  306.         abResult:                INTEGER;
  307.         abUserReference:        LONGINT;
  308.         nbpEntityPtr:            EntityPtr;
  309.         nbpBufPtr:                Ptr;
  310.         nbpBufSize:                INTEGER;
  311.         nbpDataField:            INTEGER;
  312.         nbpAddress:                AddrBlock;
  313.         nbpRetransmitInfo:        RetransType;
  314.     END;
  315.  
  316.     ATNBPRecHandle                        = ^ATNBPRecPtr;
  317.     ATATPRecPtr = ^ATATPRec;
  318.     ATATPRec = RECORD
  319.         abOpcode:                ABCallType;
  320.         filler1:                SInt8;                                    {     Filler for proper byte alignment }
  321.         abResult:                INTEGER;
  322.         abUserReference:        LONGINT;
  323.         atpSocket:                INTEGER;
  324.         atpAddress:                AddrBlock;
  325.         atpReqCount:            INTEGER;
  326.         atpDataPtr:                Ptr;
  327.         atpRspBDSPtr:            BDSPtr;
  328.         atpBitMap:                SInt8;
  329.         filler2:                SInt8;                                    {     Filler for proper byte alignment }
  330.         atpTransID:                INTEGER;
  331.         atpActCount:            INTEGER;
  332.         atpUserData:            LONGINT;
  333.         atpXO:                    BOOLEAN;
  334.         atpEOM:                    BOOLEAN;
  335.         atpTimeOut:                INTEGER;
  336.         atpRetries:                INTEGER;
  337.         atpNumBufs:                INTEGER;
  338.         atpNumRsp:                INTEGER;
  339.         atpBDSSize:                INTEGER;
  340.         atpRspUData:            LONGINT;
  341.         atpRspBuf:                Ptr;
  342.         atpRspSize:                INTEGER;
  343.     END;
  344.  
  345.     ATATPRecHandle                        = ^ATATPRecPtr;
  346.     AFPCommandBlockPtr = ^AFPCommandBlock;
  347.     AFPCommandBlock = PACKED RECORD
  348.         cmdByte:                UInt8;
  349.         startEndFlag:            UInt8;
  350.         forkRefNum:                INTEGER;
  351.         rwOffset:                LONGINT;
  352.         reqCount:                LONGINT;
  353.         newLineFlag:            UInt8;
  354.         newLineChar:            CHAR;
  355.     END;
  356.  
  357.     MPPPBPtr                            = ^MPPParamBlock;
  358.     ATPPBPtr                            = ^ATPParamBlock;
  359.     XPPParmBlkPtr                        = ^XPPParamBlock;
  360. {$IFC TYPED_FUNCTION_POINTERS}
  361.     MPPCompletionProcPtr = PROCEDURE(thePBptr: MPPPBPtr);
  362. {$ELSEC}
  363.     MPPCompletionProcPtr = Register68kProcPtr;
  364. {$ENDC}
  365.  
  366. {$IFC TYPED_FUNCTION_POINTERS}
  367.     ATPCompletionProcPtr = PROCEDURE(thePBptr: ATPPBPtr);
  368. {$ELSEC}
  369.     ATPCompletionProcPtr = Register68kProcPtr;
  370. {$ENDC}
  371.  
  372. {$IFC TYPED_FUNCTION_POINTERS}
  373.     XPPCompletionProcPtr = PROCEDURE(thePBptr: XPPParmBlkPtr);
  374. {$ELSEC}
  375.     XPPCompletionProcPtr = Register68kProcPtr;
  376. {$ENDC}
  377.  
  378. {$IFC TYPED_FUNCTION_POINTERS}
  379.     AttnRoutineProcPtr = PROCEDURE(sessRefnum: INTEGER; attnBytes: INTEGER);
  380. {$ELSEC}
  381.     AttnRoutineProcPtr = Register68kProcPtr;
  382. {$ENDC}
  383.  
  384.     MPPCompletionUPP = UniversalProcPtr;
  385.     ATPCompletionUPP = UniversalProcPtr;
  386.     XPPCompletionUPP = UniversalProcPtr;
  387.     AttnRoutineUPP = UniversalProcPtr;
  388.  
  389.     WDSElementPtr = ^WDSElement;
  390.     WDSElement = RECORD
  391.         entryLength:            INTEGER;
  392.         entryPtr:                Ptr;
  393.     END;
  394.  
  395.     NTElementPtr = ^NTElement;
  396.     NTElement = RECORD
  397.         nteAddress:                AddrBlock;                                { network address of entity }
  398.         filler:                    SInt8;
  399.         entityData:                ARRAY [0..98] OF SInt8;                    { Object, Type & Zone }
  400.     END;
  401.  
  402.     NamesTableEntryPtr = ^NamesTableEntry;
  403.     NamesTableEntry = RECORD
  404.         qNext:                    Ptr;                                    { ptr to next NTE }
  405.         nt:                        NTElement;
  406.     END;
  407.  
  408. {$IFC TYPED_FUNCTION_POINTERS}
  409.     MPPProtocolHandlerProcPtr = FUNCTION(SCCAddr1: Ptr; SCCAddr2: Ptr; MPPLocalVars: Ptr; nextFreeByteInRHA: Ptr; ReadPacketAndReadRestPtr: Ptr; numBytesLeftToReadInPacket: INTEGER): BOOLEAN;
  410. {$ELSEC}
  411.     MPPProtocolHandlerProcPtr = Register68kProcPtr;
  412. {$ENDC}
  413.  
  414. {$IFC TYPED_FUNCTION_POINTERS}
  415.     DDPSocketListenerProcPtr = FUNCTION(SCCAddr1: Ptr; SCCAddr2: Ptr; MPPLocalVars: Ptr; nextFreeByteInRHA: Ptr; ReadPacketAndReadRestPtr: Ptr; packetDestinationNumber: ByteParameter; numBytesLeftToReadInPacket: INTEGER): BOOLEAN;
  416. {$ELSEC}
  417.     DDPSocketListenerProcPtr = Register68kProcPtr;
  418. {$ENDC}
  419.  
  420.     MPPProtocolHandlerUPP = UniversalProcPtr;
  421.     DDPSocketListenerUPP = UniversalProcPtr;
  422. {
  423.     MPPProtocolHandlerProcs and  DDPSocketListenerProcs cannot be written 
  424.     in or called from a high-level language without the help of mixed mode 
  425.     or assembly glue because they use the following parameter-passing conventions:
  426.  
  427.     typedef Boolean (*MPPProtocolHandlerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, 
  428.             Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, 
  429.             short numBytesLeftToReadInPacket);
  430.  
  431.         In:
  432.             =>    SCCAddr1                    A0.L
  433.             =>    SCCAddr2                    A1.L
  434.             =>    MPPLocalVars                A2.L
  435.             =>    nextFreeByteInRHA            A3.L
  436.             =>    ReadPacketAndReadRestPtr    A4.L
  437.             =>    numBytesLeftToReadInPacket    D1.W
  438.         Out:
  439.             <=    Boolean                        Z bit of CCR
  440.  
  441.     typedef Boolean (*DDPSocketListenerProcPtr)(Ptr SCCAddr1, Ptr SCCAddr2, 
  442.             Ptr MPPLocalVars, Ptr nextFreeByteInRHA, Ptr ReadPacketAndReadRestPtr, 
  443.             UInt8 packetDestinationNumber, short numBytesLeftToReadInPacket);
  444.  
  445.         In:
  446.             =>    SCCAddr1                    A0.L
  447.             =>    SCCAddr2                    A1.L
  448.             =>    MPPLocalVars                A2.L
  449.             =>    nextFreeByteInRHA            A3.L
  450.             =>    ReadPacketAndReadRestPtr    A4.L
  451.             =>    packetDestinationNumber        D0.B
  452.             =>    numBytesLeftToReadInPacket    D1.W
  453.         Out:
  454.             <=    Boolean                        Z bit of CCR
  455.  
  456. }
  457.     MPPParamBlockPtr = ^MPPParamBlock;
  458.     MPPParamBlock = PACKED RECORD
  459.         qLink:                    QElemPtr;                                { next queue entry }
  460.         qType:                    INTEGER;                                { queue type }
  461.         ioTrap:                    INTEGER;                                { routine trap }
  462.         ioCmdAddr:                Ptr;                                    { routine address }
  463.         ioCompletion:            ATPCompletionUPP;                        { ATPCompletionUPP or MPPCompletionUPP }
  464.         ioResult:                OSErr;                                    { result code }
  465.         userData:                LONGINT;                                { Command result (ATP user bytes) }
  466.         reqTID:                    INTEGER;                                { request transaction ID }
  467.         ioRefNum:                INTEGER;                                { driver reference number }
  468.         csCode:                    INTEGER;                                { Call command code }
  469.         CASE INTEGER OF
  470.         0: (
  471.             filler0:            INTEGER;
  472.             wdsPointer:            Ptr;
  473.            );
  474.         1: (
  475.             protType:            UInt8;
  476.             filler:                SInt8;
  477.             handler:            MPPProtocolHandlerUPP;
  478.            );
  479.         2: (
  480.             socket:                UInt8;
  481.             checksumFlag:        UInt8;
  482.             listener:            DDPSocketListenerUPP;
  483.            );
  484.         3: (
  485.             interval:            UInt8;                                    { retry interval  }
  486.             count:                UInt8;                                    { retry count  }
  487.             nbpPtrs:            Ptr;
  488.             CASE INTEGER OF
  489.             0: (
  490.                 verifyFlag:        UInt8;
  491.                 filler3:        UInt8;
  492.                );
  493.             1: (
  494.                 retBuffPtr:        Ptr;
  495.                 retBuffSize:    INTEGER;
  496.                 maxToGet:        INTEGER;
  497.                 numGotten:        INTEGER;
  498.                );
  499.             2: (
  500.                 confirmAddr:    AddrBlock;
  501.                 newSocket:        UInt8;
  502.                 filler4:        UInt8;
  503.                );
  504.                );
  505.             4: (
  506.                 newSelfFlag:    UInt8;                                    { self-send toggle flag  }
  507.                 oldSelfFlag:    UInt8;                                    { previous self-send state  }
  508.                );
  509.             5: (
  510.                 nKillQEl:        Ptr;                                    { ptr to i/o queue element to cancel  }
  511.                );
  512.             6: (
  513.                 version:        INTEGER;                                { requested info version }
  514.                 varsPtr:        Ptr;                                    { pointer to well known MPP vars }
  515.                 DCEPtr:            Ptr;                                    { pointer to MPP DCE }
  516.                 portID:            INTEGER;                                { port number [0..7] }
  517.                 configuration:    LONGINT;                                { 32-bit configuration word }
  518.                 selfSend:        INTEGER;                                { non zero if SelfSend enabled }
  519.                 netLo:            INTEGER;                                { low value of network range }
  520.                 netHi:            INTEGER;                                { high value of network range }
  521.                 ourAdd:            LONGINT;                                { our 24-bit AppleTalk address }
  522.                 routerAddr:        LONGINT;                                { 24-bit address of (last) router }
  523.                 numOfPHs:        INTEGER;                                { max. number of protocol handlers }
  524.                 numOfSkts:        INTEGER;                                { max. number of static sockets }
  525.                 numNBPEs:        INTEGER;                                { max. concurrent NBP requests }
  526.                 nTQueue:        Ptr;                                    { pointer to registered name queue }
  527.                 LAlength:        INTEGER;                                { length in bytes of data link addr }
  528.                 linkAddr:        Ptr;                                    { data link address returned }
  529.                 zoneName:        Ptr;                                    { zone name returned }
  530.                );
  531.             7: (
  532.                 appName:        Ptr;                                    { pointer to application name in buffer }
  533.                );
  534.     END;
  535.  
  536.  
  537.     XPPParamBlockPtr = ^XPPParamBlock;
  538.     XPPParamBlock = PACKED RECORD
  539.         qLink:                    QElemPtr;
  540.         qType:                    INTEGER;
  541.         ioTrap:                    INTEGER;
  542.         ioCmdAddr:                Ptr;
  543.         ioCompletion:            XPPCompletionUPP;
  544.         ioResult:                OSErr;
  545.         cmdResult:                LONGINT;
  546.         ioVRefNum:                INTEGER;
  547.         ioRefNum:                INTEGER;
  548.         csCode:                    INTEGER;
  549.         CASE INTEGER OF
  550.         0: (
  551.             abortSCBPtr:        Ptr;                                    {  SCB pointer for AbortOS }
  552.            );
  553.         1: (
  554.             aspMaxCmdSize:        INTEGER;                                { For SPGetParms }
  555.             aspQuantumSize:        INTEGER;
  556.             numSesss:            INTEGER;
  557.            );
  558.         2: (
  559.             sessRefnum:            INTEGER;                                { Offset to session refnum  }
  560.             aspTimeout:            UInt8;                                    { Timeout for ATP  }
  561.             aspRetry:            UInt8;                                    { Retry count for ATP  }
  562.             CASE INTEGER OF
  563.             0: (
  564.                 serverAddr:        AddrBlock;                                { Server address block  }
  565.                 scbPointer:        Ptr;                                    { SCB pointer  }
  566.                 attnRoutine:    AttnRoutineUPP;                            { Attention routine pointer }
  567.                );
  568.             1: (
  569.                 cbSize:            INTEGER;                                { Command block size  }
  570.                 cbPtr:            Ptr;                                    { Command block pointer  }
  571.                 rbSize:            INTEGER;                                { Reply buffer size  }
  572.                 rbPtr:            Ptr;                                    { Reply buffer pointer  }
  573.                 CASE INTEGER OF
  574.                 0: (
  575.                     afpAddrBlock: AddrBlock;                            { block in AFP login  }
  576.                     afpSCBPtr:    Ptr;                                    { SCB pointer in AFP login  }
  577.                     afpAttnRoutine: AttnRoutineUPP;                        { routine pointer in AFP login  }
  578.                    );
  579.                 1: (
  580.                     wdSize:        INTEGER;                                { Write Data size }
  581.                     wdPtr:        Ptr;                                    { Write Data pointer }
  582.                     ccbStart:    PACKED ARRAY [0..295] OF UInt8;            { CCB memory allocated for driver afpWrite max size(CCB)=296 all other calls=150 }
  583.                    );
  584.                    );
  585.                    );
  586.                 3: (
  587.                     xppSubCode:    INTEGER;
  588.                     xppTimeout:    UInt8;                                    { retry interval (seconds) }
  589.                     xppRetry:    UInt8;                                    { retry count }
  590.                     filler1:    INTEGER;
  591.                     zipBuffPtr:    Ptr;                                    { pointer to buffer (must be 578 bytes) }
  592.                     zipNumZones: INTEGER;                                { no. of zone names in this response }
  593.                     zipLastFlag: UInt8;                                    { non-zero if no more zones }
  594.                     filler2:    UInt8;                                    { filler }
  595.                     zipInfoField: PACKED ARRAY [1..70] OF UInt8;        { on initial call, set first word to zero }
  596.                    );
  597.     END;
  598.  
  599.     ATPParamBlockPtr = ^ATPParamBlock;
  600.     ATPParamBlock = PACKED RECORD
  601.         qLink:                    QElemPtr;                                { next queue entry }
  602.         qType:                    INTEGER;                                { queue type }
  603.         ioTrap:                    INTEGER;                                { routine trap }
  604.         ioCmdAddr:                Ptr;                                    { routine address }
  605.         ioCompletion:            ATPCompletionUPP;                        { ATPCompletionUPP or MPPCompletionUPP }
  606.         ioResult:                OSErr;                                    { result code }
  607.         userData:                LONGINT;                                { Command result (ATP user bytes) }
  608.         reqTID:                    INTEGER;                                { request transaction ID }
  609.         ioRefNum:                INTEGER;                                { driver reference number }
  610.         csCode:                    INTEGER;                                { Call command code }
  611.         atpSocket:                UInt8;                                    { currbitmap for requests or ATP socket number }
  612.         atpFlags:                UInt8;                                    { control information }
  613.         addrBlock:                AddrBlock;                                { source/dest. socket address }
  614.         reqLength:                INTEGER;                                { request/response length }
  615.         reqPointer:                Ptr;                                    { ->request/response Data }
  616.         bdsPointer:                Ptr;                                    { ->response BDS  }
  617.         CASE INTEGER OF
  618.         0: (
  619.             numOfBuffs:            UInt8;                                    { numOfBuffs  }
  620.             timeOutVal:            UInt8;                                    { timeout interval  }
  621.             numOfResps:            UInt8;                                    { number of responses actually received  }
  622.             retryCount:            UInt8;                                    { number of retries  }
  623.             intBuff:            INTEGER;                                { used internally for NSendRequest  }
  624.             TRelTime:            UInt8;                                    { TRelease time for extended send request  }
  625.             filler0:            SInt8;
  626.            );
  627.         1: (
  628.             filler:                UInt8;
  629.             bdsSize:            UInt8;                                    { number of BDS elements  }
  630.             transID:            INTEGER;                                { transaction ID recd.  }
  631.            );
  632.         2: (
  633.             bitMap:                UInt8;
  634.             filler2:            UInt8;
  635.            );
  636.         3: (
  637.             rspNum:                UInt8;
  638.             filler3:            UInt8;
  639.            );
  640.         4: (
  641.             aKillQEl:            Ptr;                                    { ptr to i/o queue element to cancel }
  642.            );
  643.     END;
  644.  
  645.  
  646. CONST
  647.     uppATalkTransitionEventProcInfo = $00000FF1;
  648.     uppMPPCompletionProcInfo = $00009802;
  649.     uppATPCompletionProcInfo = $00009802;
  650.     uppXPPCompletionProcInfo = $00009802;
  651.     uppAttnRoutineProcInfo = $00061002;
  652.     uppMPPProtocolHandlerProcInfo = $0000007F;
  653.     uppDDPSocketListenerProcInfo = $0000008F;
  654.  
  655. FUNCTION NewATalkTransitionEventProc(userRoutine: ATalkTransitionEventProcPtr): ATalkTransitionEventUPP;
  656.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  657.     INLINE $2E9F;
  658.     {$ENDC}
  659.  
  660. FUNCTION NewMPPCompletionProc(userRoutine: MPPCompletionProcPtr): MPPCompletionUPP;
  661.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  662.     INLINE $2E9F;
  663.     {$ENDC}
  664.  
  665. FUNCTION NewATPCompletionProc(userRoutine: ATPCompletionProcPtr): ATPCompletionUPP;
  666.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  667.     INLINE $2E9F;
  668.     {$ENDC}
  669.  
  670. FUNCTION NewXPPCompletionProc(userRoutine: XPPCompletionProcPtr): XPPCompletionUPP;
  671.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  672.     INLINE $2E9F;
  673.     {$ENDC}
  674.  
  675. FUNCTION NewAttnRoutineProc(userRoutine: AttnRoutineProcPtr): AttnRoutineUPP;
  676.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  677.     INLINE $2E9F;
  678.     {$ENDC}
  679.  
  680. FUNCTION NewMPPProtocolHandlerProc(userRoutine: MPPProtocolHandlerProcPtr): MPPProtocolHandlerUPP;
  681.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  682.     INLINE $2E9F;
  683.     {$ENDC}
  684.  
  685. FUNCTION NewDDPSocketListenerProc(userRoutine: DDPSocketListenerProcPtr): DDPSocketListenerUPP;
  686.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  687.     INLINE $2E9F;
  688.     {$ENDC}
  689.  
  690. FUNCTION CallATalkTransitionEventProc(eventCode: LONGINT; qElem: ATQEntryPtr; eventParameter: UNIV Ptr; userRoutine: ATalkTransitionEventUPP): LONGINT;
  691.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  692.     {To be implemented:  Glue to move parameters into registers.}
  693.     {$ENDC}
  694.  
  695. PROCEDURE CallMPPCompletionProc(thePBptr: MPPPBPtr; userRoutine: MPPCompletionUPP);
  696.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  697.     {To be implemented:  Glue to move parameters into registers.}
  698.     {$ENDC}
  699.  
  700. PROCEDURE CallATPCompletionProc(thePBptr: ATPPBPtr; userRoutine: ATPCompletionUPP);
  701.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  702.     {To be implemented:  Glue to move parameters into registers.}
  703.     {$ENDC}
  704.  
  705. PROCEDURE CallXPPCompletionProc(thePBptr: XPPParmBlkPtr; userRoutine: XPPCompletionUPP);
  706.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  707.     {To be implemented:  Glue to move parameters into registers.}
  708.     {$ENDC}
  709.  
  710. PROCEDURE CallAttnRoutineProc(sessRefnum: INTEGER; attnBytes: INTEGER; userRoutine: AttnRoutineUPP);
  711.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  712.     {To be implemented:  Glue to move parameters into registers.}
  713.     {$ENDC}
  714.  
  715. FUNCTION CallMPPProtocolHandlerProc(SCCAddr1: Ptr; SCCAddr2: Ptr; MPPLocalVars: Ptr; nextFreeByteInRHA: Ptr; ReadPacketAndReadRestPtr: Ptr; numBytesLeftToReadInPacket: INTEGER; userRoutine: MPPProtocolHandlerUPP): BOOLEAN;
  716.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  717.     {To be implemented:  Glue to move parameters into registers.}
  718.     {$ENDC}
  719.  
  720. FUNCTION CallDDPSocketListenerProc(SCCAddr1: Ptr; SCCAddr2: Ptr; MPPLocalVars: Ptr; nextFreeByteInRHA: Ptr; ReadPacketAndReadRestPtr: Ptr; packetDestinationNumber: ByteParameter; numBytesLeftToReadInPacket: INTEGER; userRoutine: DDPSocketListenerUPP): BOOLEAN;
  721.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  722.     {To be implemented:  Glue to move parameters into registers.}
  723.     {$ENDC}
  724. FUNCTION OpenXPP(VAR xppRefnum: INTEGER): OSErr;
  725. FUNCTION ASPOpenSession(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  726. FUNCTION ASPCloseSession(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  727. FUNCTION ASPAbortOS(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  728. FUNCTION ASPGetParms(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  729. FUNCTION ASPCloseAll(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  730. FUNCTION ASPUserWrite(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  731. FUNCTION ASPUserCommand(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  732. FUNCTION ASPGetStatus(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  733. FUNCTION AFPCommand(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  734. FUNCTION GetLocalZones(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  735. FUNCTION GetZoneList(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  736. FUNCTION GetMyZone(thePBptr: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  737. FUNCTION PAttachPH(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  738. FUNCTION PDetachPH(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  739. FUNCTION PWriteLAP(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  740. FUNCTION POpenSkt(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  741. FUNCTION PCloseSkt(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  742. FUNCTION PWriteDDP(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  743. FUNCTION PRegisterName(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  744. FUNCTION PLookupName(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  745. FUNCTION PConfirmName(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  746. FUNCTION PRemoveName(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  747. FUNCTION PSetSelfSend(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  748. FUNCTION PKillNBP(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  749. FUNCTION PGetAppleTalkInfo(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  750. FUNCTION PATalkClosePrep(thePBptr: MPPPBPtr; async: BOOLEAN): OSErr;
  751. FUNCTION POpenATPSkt(thePBptr: ATPPBPtr; async: BOOLEAN): OSErr;
  752. FUNCTION PCloseATPSkt(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  753. FUNCTION PSendRequest(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  754. FUNCTION PGetRequest(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  755. FUNCTION PSendResponse(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  756. FUNCTION PAddResponse(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  757. FUNCTION PRelTCB(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  758. FUNCTION PRelRspCB(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  759. FUNCTION PNSendRequest(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  760. FUNCTION PKillSendReq(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  761. FUNCTION PKillGetReq(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  762. FUNCTION ATPKillAllGetReq(thePBPtr: ATPPBPtr; async: BOOLEAN): OSErr;
  763. PROCEDURE BuildLAPwds(wdsPtr: Ptr; dataPtr: Ptr; destHost: INTEGER; prototype: INTEGER; frameLen: INTEGER);
  764. PROCEDURE BuildDDPwds(wdsPtr: Ptr; headerPtr: Ptr; dataPtr: Ptr; netAddr: AddrBlock; ddpType: INTEGER; dataLen: INTEGER);
  765. PROCEDURE NBPSetEntity(buffer: Ptr; nbpObject: Str32; nbpType: Str32; nbpZone: Str32);
  766. PROCEDURE NBPSetNTE(ntePtr: Ptr; nbpObject: Str32; nbpType: Str32; nbpZone: Str32; socket: INTEGER);
  767. FUNCTION GetBridgeAddress: INTEGER;
  768. FUNCTION BuildBDS(buffPtr: Ptr; bdsPtr: Ptr; buffSize: INTEGER): INTEGER;
  769. FUNCTION MPPOpen: OSErr;
  770. FUNCTION LAPAddATQ(theATQEntry: ATQEntryPtr): OSErr;
  771. FUNCTION LAPRmvATQ(theATQEntry: ATQEntryPtr): OSErr;
  772. FUNCTION ATPLoad: OSErr;
  773. FUNCTION ATPUnload: OSErr;
  774. FUNCTION NBPExtract(theBuffer: Ptr; numInBuf: INTEGER; whichOne: INTEGER; VAR abEntity: EntityName; VAR address: AddrBlock): OSErr;
  775. FUNCTION GetNodeAddress(VAR myNode: INTEGER; VAR myNet: INTEGER): OSErr;
  776. FUNCTION IsMPPOpen: BOOLEAN;
  777. FUNCTION IsATPOpen: BOOLEAN;
  778. PROCEDURE ATEvent(event: LONGINT; infoPtr: Ptr);
  779. FUNCTION ATPreFlightEvent(event: LONGINT; cancel: LONGINT; infoPtr: Ptr): OSErr;
  780. {
  781.     The following routines are obsolete and will not be supported on
  782.     PowerPC. Equivalent functionality is provided by the routines
  783.     above.
  784. }
  785. {$IFC TARGET_CPU_68K }
  786. FUNCTION MPPClose: OSErr;
  787. FUNCTION LAPOpenProtocol(theLAPType: ByteParameter; protoPtr: Ptr): OSErr;
  788. FUNCTION LAPCloseProtocol(theLAPType: ByteParameter): OSErr;
  789. FUNCTION LAPWrite(abRecord: ATLAPRecHandle; async: BOOLEAN): OSErr;
  790. FUNCTION LAPRead(abRecord: ATLAPRecHandle; async: BOOLEAN): OSErr;
  791. FUNCTION LAPRdCancel(abRecord: ATLAPRecHandle): OSErr;
  792. FUNCTION DDPOpenSocket(VAR theSocket: INTEGER; sktListener: Ptr): OSErr;
  793. FUNCTION DDPCloseSocket(theSocket: INTEGER): OSErr;
  794. FUNCTION DDPRead(abRecord: ATDDPRecHandle; retCksumErrs: BOOLEAN; async: BOOLEAN): OSErr;
  795. FUNCTION DDPWrite(abRecord: ATDDPRecHandle; doChecksum: BOOLEAN; async: BOOLEAN): OSErr;
  796. FUNCTION DDPRdCancel(abRecord: ATDDPRecHandle): OSErr;
  797. FUNCTION ATPOpenSocket(addrRcvd: AddrBlock; VAR atpSocket: INTEGER): OSErr;
  798. FUNCTION ATPCloseSocket(atpSocket: INTEGER): OSErr;
  799. FUNCTION ATPSndRequest(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  800. FUNCTION ATPRequest(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  801. FUNCTION ATPReqCancel(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  802. FUNCTION ATPGetRequest(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  803. FUNCTION ATPSndRsp(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  804. FUNCTION ATPAddRsp(abRecord: ATATPRecHandle): OSErr;
  805. FUNCTION ATPResponse(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  806. FUNCTION ATPRspCancel(abRecord: ATATPRecHandle; async: BOOLEAN): OSErr;
  807. FUNCTION NBPRegister(abRecord: ATNBPRecHandle; async: BOOLEAN): OSErr;
  808. FUNCTION NBPLookup(abRecord: ATNBPRecHandle; async: BOOLEAN): OSErr;
  809. FUNCTION NBPConfirm(abRecord: ATNBPRecHandle; async: BOOLEAN): OSErr;
  810. FUNCTION NBPRemove(abEntity: EntityPtr): OSErr;
  811. FUNCTION NBPLoad: OSErr;
  812. FUNCTION NBPUnload: OSErr;
  813. {$ENDC}  {TARGET_CPU_68K}
  814.  
  815. {$ALIGN RESET}
  816. {$POP}
  817.  
  818. {$SETC UsingIncludes := AppleTalkIncludes}
  819.  
  820. {$ENDC} {__APPLETALK__}
  821.  
  822. {$IFC NOT UsingIncludes}
  823.  END.
  824. {$ENDC}
  825.